The present invention relates to a method and apparatus for providing information for a histogram and particularly to a method and apparatus for providing such information on a real time basis.
A histogram is a representation of the number and/or duration of certain events, for example portraying the times required by a computer to execute various procedures or instructions. An illustration of a histogram is provided in FIG. 3 wherein different events are represented by different horizontal bars and the lengths of the bars represent numbers of events or elapsed time.
A histogram may be generated by a computer via a software procedure employed on a sampling basis for logging the times required for different procedures or their number of occurrences, but unfortunately this approach has the effect of interfering with the software or computer being tested. A second approach would employ a plurality of hardware timers or counters, each assigned to a particular event or procedure, and each enabled when that particular event or procedure takes place. This approach is satisfactory for limited numbers of events but becomes impractical for a histogram of any size.
One prior art method is described in a paper by Steven Kerman, entitled: A Facility for Analyzing Microprocessor System Performance, published in the Digest of Papers, IEEE Compcon, 1979. In this system, a large number of counters is simulated by one counter and a random access memory. During the occurrence of each event the counter counts clock pulses and its concluding count is added to a stored value in memory. The same adder is employed successively for updating many different memory locations. While more practical than a multiplicity of counters, this system still tends to be somewhat hardware intensive and slower than desired because of the time required for adder operation. Lack of speed significantly limits the usefulness of a histogram processor in real-time applications.